package cn.com.headfree.dictionary.service;

import java.util.List;

import org.springframework.web.context.WebApplicationContext;

import com.gta.edu.sdk.base.service.IBaseService;
import com.gta.edu.sdk.common.dto.Page;
import com.gta.edu.sdk.common.dto.TreeDto;

import cn.com.headfree.dictionary.entity.TCommonDictionary;

public interface IDictionaryService extends IBaseService<TCommonDictionary> {
    List<TCommonDictionary> findAll();

    /**
     * 根据父节点id查询子节点信息
     *
     * @param pId
     * @param page
     */
    void findPageDictionaryByPId(String pId, String sysCode, String name, Page<TCommonDictionary> page);

    /**
     * 根据父节点id获取树形结构数据
     *
     * @param pId
     * @return
     */
    TreeDto dictTreeList(String pId, String sysCode, WebApplicationContext app) throws Exception;

    /**
     * 根据父节点value值查询自己集用于展示
     *
     * @param parentValue
     * @return
     */
    List<TCommonDictionary> getAllByParentValue(String parentValue);

    /**
     * 新增或更新
     *
     */
    void cleanCache() throws Exception;

	/**
	 * 新增或更新
	 *
	 * @param deleteIds
	 */
	void removeData(String[] deleteIds) throws Exception;

}
